home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 36
/
Amiga Format CD36 (1999-01-22)(Future Publishing)(GB)[!][issue 1999-02].iso
/
-seriously_amiga-
/
wb
/
viewfonts2
/
install_vf2
next >
Wrap
Text File
|
1998-12-07
|
4KB
|
121 lines
; $VER: Viewfonts 2 installer 2/2/97 by David McMinn
(set @default-dest "Workbench:Tools")
(set @default-src (pathonly @icon))
; Set minimum requirements for Viewfonts 2
(set #min_osversion 36)
; Set all the strings to what they would be in english.
(set #abort_osversion ("Your version of Workbench is too old to use with %s.\n\n\nAborting install." @appname))
(set #prompt_reqtools "Copying reqtools.library v38.1210")
(set #prompt_drawer "Program and help file installation destination")
(set #abort_samedir "Cannot install to source directory, aborting.")
(set #prompt_MWBicons "Do you want to use MagicWB style icons?")
(set #help_MWBicons "If you have installed either MagicWB (MWB) or ")
(set #help_MWBicons (cat #help_MWBicons "Magic User Interface (MUI), then you will probably want"))
(set #help_MWBicons (cat #help_MWBicons " to use these icons instead of the standard ones. To "))
(set #help_MWBicons (cat #help_MWBicons "copy these icons instead of the standard ones select "))
(set #help_MWBicons (cat #help_MWBicons "`Yes' but if you want to keep the standard icons, "))
(set #help_MWBicons (cat #help_MWBicons "select `No'."))
(set #prompt_copyprog "Copying program and icon")
(set #prompt_copyhelp "Copying help file and icon")
(set #abort_trapuser "You have aborted installation, quitting.")
; Any other languages should be inserted here, like the example
(if (= @language "deutsch")
; Strings set in here
)
; Check for minimum requirements
(set osversion (/ (getversion) 65536) )
(set osrevision (- (getversion) (* osversion 65536) ) )
(if (< osversion #min_osversion) (exit abort_osversion) )
; Copy reqtools.library to LIBS: unless there is a newer version there
; already, but only if it exists in the source path.
(copylib
(prompt #prompt_reqtools)
(help @copylib-help)
(source "reqtools.library")
(dest "LIBS:")
(confirm)
)
; Get destination drawer for program and help files. Check for users pressing
; the abort install button in the askdir thing. The way I have it set up to
; go to @default-dest makes it tricky to use trap 1, but if the user aborts
; askdir returns an abort which cause a script error when you try to assign
; it to a @ type variable
(if (trap 3
(set @default-dest (askdir
(prompt #prompt_drawer)
(help @askdir-help)
(default @default-dest)
(newpath)
))
) (exit #abort_trapuser (quiet)))
; Make sure that destination drawer selected is not same as
; source directory
(if (= @default-dest @default-src) (exit #abort_samedir))
; Ask user if they want to install MWB icons or use the standard ones
(set flag (askbool
(prompt #prompt_MWBicons)
(help #help_MWBicons)
))
; Copy main program executable and appropriate icon
(if flag ; If MWB icons selected
(set icon_file "Viewfonts2_MWB/Viewfonts2.info"); Copy MWB icon
(set icon_file "Viewfonts2.info") ; Else copy standard icon
)
(copyfiles
(prompt #prompt_copyprog)
(help @copyfile-help)
(source @default-src)
(choices "Viewfonts2" icon_file)
(dest @default-dest)
(files)
(confirm)
)
; Copy help file and appropriate icon
(if flag ; If MWB icons selected
(set icon_file "Viewfonts2_MWB/Viewfonts2.guide.info") ; Copy MWB icon
(set icon_file "Viewfonts2.guide.info") ; Else copy standard icon
)
(copyfiles
(prompt #prompt_copyhelp)
(help @copyfile-help)
(source @default-src)
(choices "Viewfonts2.guide" icon_file)
(dest @default-dest)
(files)
(confirm)
)
; Copy MWB drawer icon if a new drawer was created (best guess at if a new
; drawer was created was to check if the destination path contained `viewfont')
(if (patmatch "#?viewfont#?" @default-dest)
(copyfiles
(prompt "Copying MWB drawer image")
(help @copyfile-help)
(source "Viewfonts2_MWB.info")
(dest @default-dest)
(newname (cat @default-dest ".info"))
(confirm)
)
)